<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <HelloWorld />
    <div style="text-align:left;">
      如何引入jquery: <br>
      1 安装Jquery : npm i jquery<br>
      2 需要新增vue.config.js文件并按如下配置 <br>
      <pre style="text-align:left;border:1px solid red;">{{VueConfigJs}}</pre>
    </div>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    HelloWorld
  },
  data() {
    return {
      VueConfigJs: `const webpack = require("webpack")

module.exports = {
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin(
                {
                    jQuery: "jquery",
                    $: "jquery",
                }
            )
        ]
    }
}`
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
